<!DOCTYPE HTML>
<html>
  <head>
	{% block meta %}
	<link rel="stylesheet" href="/static/base.css" type="text/css"/>
	<script type="text/javascript" src="/static/jquery-1.4.4.min.js"></script>
	<script type="text/javascript">
	  var ft = new Object();
	  ft.showrate=function(node){
	  $(node).find("[class=rate]").show();
	  $(node).mouseout(function(){
	  $(this).find("[class=rate]").hide();
	  })
	  }
	</script>
	{% end %}
	<title>{% block title %} default title {% end %}</title>
  </head>
  <body>
	<div class="wrapper">
	  <header class="clearfix">
		{% block header %}
		<h1>ChiHuo</h1>
		{% end %}
		<nav class="clearfix">
		  {% for cate in categories %}
		  <a href="#">{{ cate.name }}</a>
		  {% end %}
		  <a href="/login">登录</a>
		</nav>
	  </header>

	  <div id="ibody clearfix">
		{% block content%}
		<div class="c1 clearfix">
		  <div class="s1">
			<ul>
			  <li><a href="/order/year">本年最佳</a></li>
			  <li><a href="/order/month">本月最佳</a></li>
			  <li><a href="/order/today">本日最佳</a></li>
			</ul>
		  </div>
		{% if not items %}
		  <div> 无数据 </div>
		{% end %}
		{% for item in items %}
		<div class="i1">
		  <table width="100%" cellspacing="0" cellpadding="0" border="0">
			<tr>
			  <td background="/static/attachments/thumb_{{ item.ename }}">
				<div class="img" onmouseover="ft.showrate(this)" onclick="location.href='/show/item/{{ item.id }}'">
				  <div class="t">{{ item.name }}</div>
				  <div class="rate"><span>{{ item.rank }}</span></div> 
				<div>
			  </td>
			</tr>
			<tr>
			  <td class="tag">
				<a href="#">下单</a> 
				<a href="#">收藏</a> 
				<a href="#">介绍</a> 
				<a href="#">配置</a>
			  </td>
			</tr>
		  </table>
		</div>
		{% end %}
		</div>
		{% end %}
	  </div>
	
	  <footer>
		{% block footer %}
		<img src="/static/HTML5_Logo_32.png" width="32" style="margin-bottom:10px"/>
		<img src="/static/bpsky.png" width="32" style="margin-bottom:10px"/>
		{% end %}
	  </footer>
	
	</div>
  </body>
</html>
